package com.hice.demo.sbdbra;

import com.hice.demo.sbdbra.common.spring.SpringContextUtil;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.context.web.SpringBootServletInitializer;
import org.springframework.context.ApplicationContext;

@SpringBootApplication
public class UserApiApplication extends SpringBootServletInitializer {

    @Override
    protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
        return application.sources(UserApiApplication.class);
    }

    /**
     * 项目模块启动主函数
     * @param args
     */
    public static void main(String[] args) {
        ApplicationContext applicationContext = SpringApplication.run(UserApiApplication.class, args);
        SpringContextUtil.setApplicationContext(applicationContext);
    }

}
